package com.zs.oauth2.api.controller;

import com.zs.oauth2.common.service.util.SecurityUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author madison
 * @description
 * @date 2021/4/4 13:45
 */
@RestController
public class IndexController {

    @GetMapping("auth")
    public ResponseEntity auth() {
        return ResponseEntity.ok(SecurityUtils.getUser());
    }

    @GetMapping("noAuth")
    public ResponseEntity noAuth() {
        return ResponseEntity.ok("noAuth");
    }
}
